<?php /* Smarty version Smarty-3.1.18, created on 2017-06-02 10:31:14
         compiled from "/data/www/mystery/protected/views/benchmark/all.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1411900491554c7088769d53-86216116%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd9e51d6d28f2c41fa0cd280607ab065a304584c1' => 
    array (
      0 => '/data/www/mystery/protected/views/benchmark/all.tpl',
      1 => 1494904489,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1411900491554c7088769d53-86216116',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_554c708885ffd1_70382171',
  'variables' => 
  array (
    'question_list' => 0,
    'val' => 0,
    'question_id' => 0,
    'show_subject_list' => 0,
    'subject_id' => 0,
    'next_network' => 0,
    'next_network_id' => 0,
    'nlist' => 0,
    'key' => 0,
    'nq_id' => 0,
    'question_info' => 0,
    'subject_list' => 0,
    'network_subject_answer' => 0,
    'question_option' => 0,
    'option_key' => 0,
    'option_val' => 0,
    'v' => 0,
    'netquestion_name' => 0,
    'benchmark_list' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_554c708885ffd1_70382171')) {function content_554c708885ffd1_70382171($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('../common/head.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<style>
<!--
.titlist{padding:10px; display:block;}
.titlist a{ display:block; clear:both; height:44px; line-height:44px; text-align:left; font-family:"微软雅黑"; font-size:24px; color:#000;}
.titlist a.dq{ color:#b73632}
-->
</style>
<div class="main w1060">
    	<div class="onemain" style="margin-bottom:20px;">
            <form name="form2" method="get" action="/benchmark/all">
                问卷：<select name="question_id" autocomplete="off" onchange="this.form.submit();">
                        <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['question_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                        <option value="<?php echo $_smarty_tpl->tpl_vars['val']->value['question_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['val']->value['question_id']==$_smarty_tpl->tpl_vars['question_id']->value) {?>selected="selected"<?php }?> ><?php echo $_smarty_tpl->tpl_vars['val']->value['question_name'];?>
</option>
                        <?php } ?>
                </select>
                        指标：<select name="subject_id" autocomplete="off" onchange="this.form.submit();">
                            <option value="0">所有指标</option>
                            <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['show_subject_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['subject_id']->value==$_smarty_tpl->tpl_vars['val']->value['subject_id']) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value['title'];?>
</option>
                            <?php } ?>
                        </select>
                        分/支：<select name="next_network_id" autocomplete="off" onchange="this.form.submit();">
                            <option value="0">所有</option>
                            <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['next_network']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['val']->value['network_id'];?>
" <?php if ($_smarty_tpl->tpl_vars['next_network_id']->value==$_smarty_tpl->tpl_vars['val']->value['network_id']) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value['network_name'];?>
</option>
                            <?php } ?>
                        </select>
                        <?php if ($_smarty_tpl->tpl_vars['nlist']->value) {?>
                        网点：<select name="nq_id" autocomplete="off" onchange="this.form.submit();">
                            <option value="0">所有网点</option>
                            <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['nlist']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                            <option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['nq_id']->value==$_smarty_tpl->tpl_vars['key']->value) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
</option>
                            <?php } ?>
                    </select>
                    <?php }?>
		<div class="clerbox"></div>
            </form>
	</div>
	<div class="biaoge">   
	<h2 class="wjtit"><?php echo $_smarty_tpl->tpl_vars['question_info']->value['question_name'];?>
</h2>
	<p class="wjbh"><label>问卷编号</label><?php echo $_smarty_tpl->tpl_vars['question_info']->value['identifier'];?>
</p>
	
	<table width="100%" border="0" cellspacing="0">
	  <tr>
		<td width="70%"><strong>指标</strong></td>
		<td width="15%"><strong>标准分</strong></td>
                <td width="15%"><strong>选项</strong></td>
	  </tr>
          <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['subject_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
          <?php if (isset($_smarty_tpl->tpl_vars['network_subject_answer']->value[$_smarty_tpl->tpl_vars['val']->value['subject_id']])) {?>
          <tr style="background: #2D93CA">
              <td>
                  <?php echo $_smarty_tpl->tpl_vars['val']->value['question_num'];?>
<?php echo $_smarty_tpl->tpl_vars['val']->value['title'];?>
<br/>
                  <?php echo $_smarty_tpl->tpl_vars['val']->value['content'];?>
 
              </td>
              <td><?php echo $_smarty_tpl->tpl_vars['val']->value['standard_score'];?>
</td>
              <td>
                  <?php if ($_smarty_tpl->tpl_vars['question_option']->value[$_smarty_tpl->tpl_vars['val']->value['subject_id']]) {?>
                    <?php  $_smarty_tpl->tpl_vars['option_val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['option_val']->_loop = false;
 $_smarty_tpl->tpl_vars['option_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['question_option']->value[$_smarty_tpl->tpl_vars['val']->value['subject_id']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['option_val']->key => $_smarty_tpl->tpl_vars['option_val']->value) {
$_smarty_tpl->tpl_vars['option_val']->_loop = true;
 $_smarty_tpl->tpl_vars['option_key']->value = $_smarty_tpl->tpl_vars['option_val']->key;
?>
                            <?php echo $_smarty_tpl->tpl_vars['option_key']->value;?>
:<?php echo $_smarty_tpl->tpl_vars['option_val']->value;?>
<br/>
                    <?php } ?>
                  <?php }?></td>
	  </tr>
          <tr>
              <td colspan="3">
                  <table width="100%" border="0" cellspacing="0">
                      <th width="20%">网点名称</th>
                      <th width="40%">情景描述</th>
                      <th width="10%">得分</th>
                      <th width="10%">选项值</th>
                      <th width="20%">操作</th>
                       <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['network_subject_answer']->value[$_smarty_tpl->tpl_vars['val']->value['subject_id']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
                       <?php if (isset($_smarty_tpl->tpl_vars['netquestion_name']->value[$_smarty_tpl->tpl_vars['v']->value['nq_id']])) {?>
                        <tr>
                            <td><b><?php echo $_smarty_tpl->tpl_vars['netquestion_name']->value[$_smarty_tpl->tpl_vars['v']->value['nq_id']];?>
</b> </td>
                            <td> <?php echo $_smarty_tpl->tpl_vars['v']->value['answer_desc'];?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['v']->value['answer_score'];?>
</td>
                            <td><?php echo $_smarty_tpl->tpl_vars['v']->value['answer_option'];?>
</td>
                            <td>
                            <?php if ($_smarty_tpl->tpl_vars['benchmark_list']->value[$_smarty_tpl->tpl_vars['val']->value['subject_id']][$_smarty_tpl->tpl_vars['v']->value['nq_id']]) {?><a href="javascript:void(0);" onclick="history(<?php echo $_smarty_tpl->tpl_vars['v']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
);return false;">历史</a><?php }?> 
                            <a href="javascript:void(0);" onclick="suggest(<?php echo $_smarty_tpl->tpl_vars['v']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
);return false;">操作</a>
                            </td>
                        </tr>
                        <?php }?>
                        <?php } ?>
                  </table>
              </td>
          </tr>
          <?php }?>
          <?php } ?>
	</table>
  </div>
</div>

<script type="text/javascript">
//问题对标的历史
function history(nq_id, subject_id){
    $.layer({
        type: 2, 
        title: '网点对标历史记录',
        border:[10, 0.3, '#000'],
        closeBtn:[0, true],
        shade: [0.5, '#000'],
        offset: ['100px', ''],
        area: ['800px', '450px'],
        iframe: {src: '/benchmark/history?nq_id='+nq_id+'&subject_id='+subject_id}
    });
}

//上级网点给出意见
function suggest(nq_id,subject_id){
    $.layer({
        type: 2,
        title: '审核意见',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['100px',''],
        area: ['500px', '400px'],
        iframe: {src: '/benchmark/suggest?nq_id='+nq_id+'&subject_id='+subject_id}
    });   
}
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
